package uk.ac.aber.Blockmation;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import uk.ac.aber.Blockmation.Actions.ActionViewerLoadProject;

/**
 * Creates an instance of Viewer that has a Menu to load project files and is
 * independant of the Main Application
 * @author alex
 */
public class ViewerStandAlone extends Viewer {
    
    ViewerStandAlone(MovieModel movieModel) {
        
        super(movieModel);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        createMenu();
        
        super.createGUI();

    }
    
    protected void createMenu() {
        
        //creating the menu bar
        JMenuBar menuBar = new JMenuBar();

        //making the first menu
        
        JMenu fileMenu = new JMenu("File");
        menuBar.add(fileMenu);

        //adding menu items to menu 1, file etc, menu items should have mneumonic key accessabilty 
        ActionViewerLoadProject actionVLoadProject = new ActionViewerLoadProject(this);
        JMenuItem menuItem = new JMenuItem(actionVLoadProject);
        fileMenu.add(menuItem);
        
        this.setJMenuBar(menuBar);
    }
    
    

}
